export const getFormData = (object) => {
    const formData = new FormData()
    Object.keys(object).forEach(key => {
        const value = object[key]
        if (Array.isArray(value)) {
            console.log(JSON.stringify(object[key]))
            formData.append(key, JSON.stringify(object[key]))
            // value.forEach((subValue, i) =>
            //     formData.append(key + `[${i}]`, subValue)
            // )
        } else {
            formData.append(key, object[key])
        }
        console.log(value)
        //formData.append(key, object[key])
    })
    return formData
}